package com.example.sqltest.service.impl;

import com.example.sqltest.pojo.AgentUser;
import com.example.sqltest.repository.AgentUserRepository;
import com.example.sqltest.service.AgentUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author: dangwen
 * @createDate: 2020/12/3
 */
@Service
public class AgentUserServiceImpl implements AgentUserService {

    @Autowired
    private AgentUserRepository agentUserRepository;

    @Override
    public void save(AgentUser agentUser) {
        agentUserRepository.save(agentUser);
    }

    @Override
    public List<AgentUser> findAgentUserLogList(String nickName) {

        return agentUserRepository.findByNickName(nickName);
    }
}
